const {loadInterfaceXML} = imports.misc.fileUtils;
+const {AdapterState} = GnomeBluetooth;
+
const BUS_NAME = 'org.gnome.SettingsDaemon.Rfkill';
const OBJECT_PATH = '/org/gnome/SettingsDaemon/Rfkill';
'active': GObject.ParamSpec.boolean('active', '', '',
GObject.ParamFlags.READABLE,
false),
+ 'adapter-state': GObject.ParamSpec.enum('adapter-state', '', '',
+ GObject.ParamFlags.READABLE,
+ AdapterState, AdapterState.ABSENT),
},
Signals: {
'devices-changed': {},
this.notify('active');
this.notify('available');
});
+ this._client.connect('notify::default-adapter-state',
+ () => this.notify('adapter-state'));
this._client.connect('notify::default-adapter', () => {
const newAdapter = this._client.default_adapter ?? null;
return this._client.default_adapter_powered;
}
+ get adapter_state() {
+ return this._client.default_adapter_state;
+ }
+
toggleActive() {
this._proxy.BluetoothAirplaneMode = this.active;
if (!this._client.default_adapter_powered)